import java.util.Scanner;

public class demo05 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请问需要多少个数？");
        int i=sc.nextInt();
        int[] a=new int[i];
        int sum=0;
        int max=0;
        for (int j=0;j<a.length;j++){
            System.out.println("请输入第"+(j+1)+"个数");
             a[j]=sc.nextInt();
            if(a[j]>max){
                max=a[j];
            }
            sum+=a[j];
        }
        System.out.println("平均数为："+sum/a.length+"最大数为："+max);
    }
}
